package com.novax.ex.activity.infrastructure.mapper;

import com.novax.ex.activity.infrastructure.entity.IeoCurrencyConfig;
import com.novax.ex.common.base.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ieo货币配置映射器
 *
 * @author 黄涛
 * @date 2022/12/12
 */
public interface IeoCurrencyConfigMapper extends BaseMapper {

    /**
     * 黄涛
     * 选择通过ieo id和货币
     *
     * @param ieoId    活动id
     * @param currency 币种名称
     * @return {@link IeoCurrencyConfig}
     */
    IeoCurrencyConfig selectByIeoIdAndCurrency(@Param("ieoId") Long ieoId, @Param("currency") String currency);

    /**
     * 黄涛
     * 通过活动id查询该活动使用不同币种参与时权重数据
     *
     * @param ieoId 项目ID
     * @return 项目相关信息
     */
    List<IeoCurrencyConfig> selectByIeoId(@Param("ieoId") Long ieoId);

    /**
     * @Description: 查询计价币种
     * @Author: ChenXi
     * @Date:  2023/4/25 14:53
     * @param ieoId
     * @return: void
     **/
    IeoCurrencyConfig findByIsPricingCurrency(@Param("ieoId")Long ieoId);

}